/*
 * 项   目：learn-jwt
 * 作   者：LuoYiMin
 * 邮   箱：1725990142@qq.com
 * 创建时间：2018/12/7 10:14
 */
package com.roin.learn.jwt;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("api")
public class ApiController {

    @RequestMapping("checkLogin.do")
    public boolean checkLogin(HttpServletRequest request){
       User user= (User) request.getAttribute(JWTFilter.LOGIN_USER_INFO_KEY);
       return user!=null;
    }
}
